User Login System with GUI

Status: Under development

This library is NOT yet ready to use.

Setup

  1. Download/install
    • composer require taeluf/user-gui dev-vbeta or {"require": {"taeluf/user-gui": "dev-vbeta"}}
  2. Set up Liaison. In your primary php file, which all non-static requests get routed to:
    • require_once(__DIR__.'/vendor/autoload.php');
      $liaison = new \Liaison();
      $userApp = \Tlf\User::newPackage($liaison, $configs=[/*see below*/]);
      $liaison->deliver()
      
    • Liaison does not yet have proper features for being framework agnostic, but it's in the plans.
  3. Now you can visit yoursite.whatever/user/ & you should see a login screen.
  4. Configure the user app. Here's a sample $config array
    • $config = [
          'Email.noreply'=>'noreply@yourwebsite.com',
          'Site.name'=>'Vote Decatur',
          'Site.url'=>'https://yourwebsite.com',
          'Support.email'=>'help@yourwebsite.com',
          'Support.name'=>'Customer Support',
      
          'DB.user'=>'username', 
          'DB.password'=>'password', 
          'DB.host'=>'localhost', 
          'DB.database'=>'temp', //the name of the database
      
          'Register.requireName'=>false, //whether to require new users to provide a name when registering an account.
      
          // 'Debug.sendEmails'=>false, // if set to false, emails are printed to the screen instead of being sent. 
          // 'Debug.throwErrors'=>true, // Barely used, but causes some errors to be thrown instead of just returning a failing value
          // 'Debug.emptyDB'=>true, // this deletes all DB content on every request, which can be helpful for debugging
      
          // 'DB.createIfBefore'=>time()+10, //this is used to create the database
      ]
      
    • See configs for a full list of configuration options.
  5. Create the database.
    • Add the DB.createIfBefore config to your newPackage() call.
    • Make a request to /user/ on your site.
    • Remove the config from your new package call